package cn.zjh.user.service.impl;

import cn.zjh.org.domain.Employee;
import cn.zjh.user.domain.Logininfo;
import cn.zjh.user.service.ILogininfoService;
import cn.zjh.user.service.service.impl.BaseServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zjh
 * @since 2022-07-06
 */
@Service
public class LogininfoServiceImpl extends BaseServiceImpl<Logininfo> implements ILogininfoService {





    /**
     * 封装logininfo，将register中的值设置到logininfo中
     * @param employee
     * @return
     */
    public Logininfo employee2Logininfo(Employee employee){
        Logininfo logininfo = new Logininfo();
        BeanUtils.copyProperties(employee,logininfo);
        //设置注册类型为员工
        logininfo.setType(0);
        return logininfo;
    }

}
